Running speed test with different methods

(a=* or activex.dll>> class1.a=*)

Test result reference

:
activex.dll(class1.A=**) About 10 times slower

 (Compared with dim a as long)
Now I still need to compare with (stand dll). I hope some interested friends can try it



'ȽϽcom dll(activex dll)ʽֱֵӶı10
'ڻҪ(activex dll)(׼dll)ĵùȽϣĸٶȸ죬ϣȤ

'=========================
BasFile_Public_A=I  used: 16.727 MS
ClassA.A   =125.8725 MS
 ActiveXDll.Class2.A       =125.5622 MS
ClassA.MethedSetB( sub)  =352.0073 MS
ActiveXExe3.Class1.A             =500655.7859 MS
'Instancing=GlobalMultiUse
'Independent mode=ʽ

ActiveXExe5.Class1.A             =11377.7648 MS
ActiveXExe.Class1.MethedSetB(SUB)=11377.7648 MS
'=========================
òͬķٶȲ
'author: xiaoyaocode@163.com
'qq: 2776478814 (chinese)
'Copyright: you can distribute it freely, but please keep the relevant author information
'Note: please turn off compilation optimization and set the power option to "high performance"
'Ȩַ뱣Ϣ
'ע⣺رձŻԴѡΪܡ
'=========================
'set speed for :
dim a as long 
for i=1 to 100000000 
    a=i
    'Class1.A=I
    'activexDLL.a=i
    'ocx.a=i
    'activexExe.a=i
    'CALL SUB SetAvalue(byval v as long)
    'or test getval: function Getvalue(arg1 as long)
next
'=========================
Compile all *.vbp(project)
Reference all dll and activex*.exe to "#project1.vbp"

Compile #project1.vbp
run #project1.exe
'=========================
you also can mak a Activex.dll for test by vc++ (vb.net,c#)

you also can mak a stand dll for test
method API:sub Setval(byval a as long)
Programing language:vc++freebasic

'=========================

Test Begin:wait ****
20-1-29 18:08:12 -- TestTimes=10000000
18:08:12 -- BasFile_Publicc_A                  =16.727 MS
18:08:12 -- Form_Puba                          =21.585 MS
18:08:12 -- ClassA.A                           =125.8725 MS
18:08:12 -- ClassA.FriendSetB(method sub)      =146.2063 MS
18:08:13 -- ClassA.MethedSetB( sub)            =352.0073 MS
18:08:13 -- ActiveXDll.Class1.MethedSetB(sub)  =339.3168 MS
18:08:13 -- ActiveXDll.Class2.A                =125.5622 MS
18:08:13 -- ActiveXExe3.Class1.A               =500655.7859 MS
18:08:13 -- ActiveXExe5.Class1.A               =11377.7648 MS
18:08:13 -- ActiveXExe.Class1.MethedSetB(SUB)  =11377.7648 MS
18:08:13 -- ActiveXexe4.Class1.A(Remote Server)=229062.8505 MS


Test Begin:wait ****
20-1-29 18:02:43 -- TestTimes=1000000
18:02:43 -- BasFile_Publicc_A                  =1.6768 MS
18:02:43 -- Form_Puba                          =2.1572 MS
18:02:43 -- ClassA.A                           =12.5821 MS
18:02:43 -- ClassA.FriendSetB(method sub)      =14.6332 MS
18:02:43 -- ClassA.MethedSetB( sub)            =35.1718 MS
18:02:43 -- ActiveXDll.Class1.MethedSetB(sub)  =33.9925 MS
18:02:43 -- ActiveXDll.Class2.A                =12.5639 MS
18:02:43 -- ActiveXExe3.Class1.A               =60472.8201 MS
18:02:43 -- ActiveXExe5.Class1.A               =5688.8824 MS
18:02:43 -- ActiveXExe.Class1.MethedSetB(SUB)  =11377.7648 MS
18:02:43 -- ActiveXexe4.Class1.A(Remote Server)=48406.7005 MS

Test Begin:wait ****
20-1-29 18:08:07 -- TestTimes=1000000
18:08:07 -- BasFile_Publicc_A                  =1.674 MS
18:08:07 -- Form_Puba                          =2.1575 MS
18:08:07 -- ClassA.A                           =12.5787 MS
18:08:07 -- ClassA.FriendSetB(method sub)      =14.6543 MS
18:08:07 -- ClassA.MethedSetB( sub)            =35.3851 MS
18:08:07 -- ActiveXDll.Class1.MethedSetB(sub)  =34.048 MS
18:08:07 -- ActiveXDll.Class2.A                =12.5724 MS
18:08:07 -- ActiveXExe3.Class1.A               =38291.8675 MS
18:08:07 -- ActiveXExe5.Class1.A               =11377.7648 MS
18:08:07 -- ActiveXExe.Class1.MethedSetB(SUB)  =11377.7648 MS
18:08:07 -- ActiveXexe4.Class1.A(Remote Server)=43155.862 MS